import torch


# 1. 张量转换为Numpy数组的方法
data_tensor = torch.tensor([2, 3, 4])
print(data_tensor)
print(type(data_tensor))
# 使用张量对象中的numpy方法进行转换
print('#######################################')
data_numpy = data_tensor.numpy()
print(data_numpy)
print(type(data_numpy))
